package com.cn.study0014.bank.com;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName AccTest.java
 * @Description
 * @createTime 2023年05月18日 16:48:00
 */
public class AccTest {
    public static void main(String[] args) {
        Account account=new Account();
        Scanner sc=new Scanner(System.in);
        int n;
        do {
            System.out.println("1.存款2.取款0.退出");
            System.out.print("请选择你需要办理的业务：");
            n=sc.nextInt();
            if (n==1){
                System.out.print("请输入存款金额：");
                int s=sc.nextInt();
                account.addDe(s);
                account.showde();
            }else if (n==2){
                System.out.print("请输入取款金额：");
                int t=sc.nextInt();
                account.withdrawals(t);
                account.showde();
            }else if(n==0){
                System.out.println("谢谢使用");
                break;
            }else {
                System.out.println("输入错误！");
            }
        }while (true);

    }
}
